<template>
	<div>
		<div class="Abox">
			<Info v-model="infoData" v-bind="querys" state="readonly"></Info>
			<Contract
				v-model="infoData"
				v-bind="querys"
				state="readonly"></Contract>
			<Footer
				v-model="infoData"
				v-bind="querys"
				state="readonly"></Footer>
			<el-button
				class="orderChangeHistory"
				type="primary"
				@click="toOrderChangeHistory">
				查看变更历史记录
			</el-button>
			<div class="handle">
				<el-button @click="back">返回</el-button>
			</div>
		</div>
	</div>
</template>

<script>
	import * as apis from '@/api/order/mainOrder/contractChange/api.js';
	import Info from '../chunk/info/index.vue';
	import Contract from '../chunk/contract/index.vue';
	import Footer from '../chunk/footer/index.vue';
	export default {
		name: 'contractChange',
		props: {
			state: {
				required: false,
			},
		},
		components: { Info, Contract, Footer },
		data() {
			return {
				infoData: {},
				querys: {},
			};
		},

		computed: {},
		created() {
			this.querys = this.$route.query ?? {};
		},
		mounted() {
			console.log(this);
		},
		methods: {
			toOrderChangeHistory() {
				this._toPage({
					name: 'OrderChangeHistory',
					query: this.querys,
				});
			},
			back() {
				this._closeCurrentPage();
				this._toPage({
					path: '/vehicleOrder/orderManagement/OrderView',
				});
			},
			submit() {
				console.log(this.infoData);
			},
		},
	};
</script>

<style lang="scss" scoped>
	.orderChangeHistory {
		position: fixed;
		bottom: calc(100vh - 150px);
		right: 40px;
		cursor: pointer;
		transition: all 0.3s;
	}
	.handle {
		height: 60px;
		display: flex;
		justify-content: flex-end;
		align-items: center;
		background-color: #fff;
		margin: 20px;
		padding: 0 20px;
		border-radius: 8px;
		box-sizing: border-box;
	}
</style>
